package com.codehub.enums;

public enum PermissionCodeEnum {
    NO_PERMISSION("no_permission", "不校验权限"),

    /**
     * 内容管理
     */
    CONTENT("content", "内容管理"),

    //帖子管理
    CONTENT_ARTICLE_LIST("content_article_list", "帖子列表"),
    CONTENT_ARTICLE_DEL("content_article_del", "删除帖子"),
    CONTENT_ARTICLE_APPROVE("content_article_approve", "审批帖子"),
    CONTENT_ARTICLE_TOP("content_article_top", "帖子置顶"),
    CONTENT_ARTICLE_EDIT_BOARD("content_article_edit_board", "修改帖子板块"),

    //评论管理
    CONTENT_COMMENT_LIST("content_comment_list", "评论列表"),
    CONTENT_COMMENT_DEL("content_comment_del", "删除评论"),
    CONTENT_COMMENT_APPROVE("content_comment_approve", "审批评论"),
    CONTENT_BOARD_LIST("content_board_list", "板块列表"),

    //板块管理
    CONTENT_BOARD_EDIT("content_board_edit", "板块修改/删除"),
    CONTENT_BOARD_ADD("content_board_add", "新增板块"),
    CONTENT_BOARD_OP("content_board_op", "板块操作"),

    /**
     * 用户管理
     */
    USER("user", "用户管理"),

    USER_LIST("user_list", "用户列表"),
    USER_OP("user_op_status", "用户启用/禁用"),
    USER_SEND_MESSAGE("user_send_message", "发送系统消息"),

    /**
     * 设置
     */
    SETTINGS("settings", "系统设置"),

    //角色管理
    SETTINGS_ROLE_LIST("settings_role_list", "角色列表"),
    SETTINGS_ROLE_EDIT("settings_role_edit", "角色修改/新增"),
    SETTINGS_ROLE_DEL("settings_role_delete", "角色删除"),

    //系统用户管理
    SETTINGS_ACCOUNT_LIST("settings_account_list", "系统用户列表"),
    SETTINGS_ACCOUNT_EDIT("settings_account_edit", "系统用户新增/修改"),
    SETTINGS_ACCOUNT_DEL("settings_account_delete", "系统用户删除"),
    SETTINGS_ACCOUNT_UPDATE_PASSWORD("settings_update_password", "修改系统用户密码"),
    SETTINGS_ACCOUNT_OP_STATUS("settings_account_op_status", "系统用户启用/禁用"),

    //系统全局设置管理
    SETTINGS_GLOBAL("settings_global", "系统全局设置"),
    SETTINGS_GLOBAL_LIST("settings_global_list", "查看系统全局设置"),
    SETTINGS_GLOBAL_EDIT("settings_global_edit", "编辑系统全局设置"),
    ;

    private final String code;
    private final String desc;

    PermissionCodeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
